import request from "../utils/request";
import { AccountType } from "../types/user";
//登录
export const userLogin = (account: AccountType) => {
  return request.post("login", account);
};
// 注册
interface UserInfoType {
  roleName: string
  schoolName: string
  username: string
  password: string
  managerName: string
  tel: string
  roleId: string
  open: boolean
}
export const usersPost = (account: UserInfoType) => {
  return request.post("users", account);
};
// 获取
export const usersGet = (objectId?:string) => {
  let query=objectId?`/${objectId}`:''
  return request.get(`users${query}`);
};